package com.lhz.project.system.mapper.auth;

import com.lhz.project.system.model.entity.auth.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * @Author: LiHuaZhi
 * @Date: 2021/8/30 21:53
 * @Version: 1.0
 **/
@Mapper
public interface LoginMapper {
    /**
     * 根据账户获取
     *
     * @param username
     * @return
     */
    Account getAccount(@Param("username") String username);

    /**
     * 更新登录信息
     *
     * @param id
     * @param loginIp
     * @param loginDate
     * @return
     */
    int updateAccountLogin(@Param("id") String id, @Param("loginIp") String loginIp, @Param("loginDate") Date loginDate);
}
